package hot.pay.admin;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.EnableAspectJAutoProxy;
import org.springframework.scheduling.annotation.EnableAsync;
import org.springframework.stereotype.Controller;
import org.springframework.web.servlet.config.annotation.EnableWebMvc;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;


/**
 * @author dongwei
 */
@Controller
@EnableWebMvc
@SpringBootApplication
@EnableAspectJAutoProxy
@EnableAsync
@ComponentScan(basePackages = {
        "com.sunmnet.framework.redis.service",
        "com.sunmnet.framework.exception.handler",
        "com.sunmnet.framework.conf",
        "hot.pay.*.controller",
        "hot.pay.*.service",
        "hot.pay"
})
public class Application extends WebMvcConfigurerAdapter implements CommandLineRunner {
    private Logger logger = LoggerFactory.getLogger(Application.class);

    public static void main(String[] args) {
        SpringApplication.run(Application.class, args);
    }

    @Override
    public void run(String... args) throws Exception {
        logger.info("服务启动完成!");
    }
}
